<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body {
            perspective: 1000px;
        }

        section {
            width: 200px;
            height: 150px;
            margin: 100px auto;
            background: url(image/ll.jpg) no-repeat;
            background-size: cover;
            position: relative;
            transform-style: preserve-3d;
            /*让父盒子里面的子盒子以3D效果显示 */
            border-radius: 20%;
            animation: move 7s linear infinite;
        }
        /* section:hover {
            animation-play-state: paused; 暂停动画
        } */

        @keyframes move {
            from {
                transform: rotateY(0deg);
            }
            to {
                transform: rotateY(360deg);
            }
        }

        section div {
            border-radius: 20%;
            width: 100%;
            height: 100%;
            background: url(image/dog.gif) no-repeat;
            background-size: cover;
            position: absolute;
            top: 0;
            left: 0;
        }

        section div:nth-child(1) {
            transform: rotateY(0deg) translateZ(300px);
        }

        section div:nth-child(2) {
            transform: rotateY(60deg) translateZ(300px);
        }

        section div:nth-child(3) {
            transform: rotateY(120deg) translateZ(300px);
        }

        section div:nth-child(4) {
            transform: rotateY(180deg) translateZ(300px);
        }

        section div:nth-child(5) {
            transform: rotateY(240deg) translateZ(300px);
        }

        section div:nth-child(6) {
            transform: rotateY(300deg) translateZ(300px);
        }
        .btns {
            display: block;
            width: 100px;
            margin: 100px auto;
        }
    </style>
</head>

<body>
    <section>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </section>

   <div class="btns">
        <input type="button" value="开始" id="begin">
        <input type="button" value="暂停" id="end">
   </div>
    <script>
            var begin = document.querySelector('#begin');
            var end = document.getElementById('end');
            var sec = document.querySelector('section');
            begin.onclick = function () {
                sec.style.animationPlayState = 'running';
            }
            end.addEventListener('click', function () {
                sec.style.animationPlayState = 'paused';
            })
            // animation-play-state  控制 播放 还是 暂停 
            // running 播放   paused 暂停

    </script>
</body>

</html>